package org.smart4j.chapter3.aspect;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.smart4j.framework.annotation.Aspect;
import org.smart4j.framework.annotation.Controller;
import org.smart4j.framework.proxy.AspectProxy;

import java.lang.reflect.Method;

@Aspect(Controller.class)
public class Controller1Aspect extends AspectProxy {

    private static final Logger LOGGER = LoggerFactory.getLogger(Controller1Aspect.class);

    @Override
    public void before(Class<?> cls, Method method, Object[] params) {
        LOGGER.debug("before first");
    }

    @Override
    public void after(Class<?> cls, Method method, Object[] params, Object result) {
        LOGGER.debug("end first");
    }
}
